<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>查询英雄</title>
    <style type="text/css">
        table {font-family: verdana,arial,sans-serif;font-size:11px;color:#333333;border-width: 1px;border-color: #999999;border-collapse: collapse;}

        table th {background:#b5cfd2 ;border-width: 1px;padding: 8px;border-style: solid;border-color: #999999;}

        table td {background:#dcddc0 ;border-width: 1px;padding: 8px;border-style: solid;border-color: #999999;}
    </style>
</head>
<body>
    <table>
        <thead>
            <th>id</th>
            <th>英雄名称</th>
            <th>英雄类型</th>
            <th>英雄价格</th>
            <th>操作</th>
        </thead>
        <tr th:each="item:${list}">
            <td th:text="${item.id}"></td>
            <td th:text="${item.name}"></td>
            <td th:text="${item.type}"></td>
            <td th:text="${item.price}"></td>
            <td>
                <form method="post" action="delete" style="display: inline">
                    <input name="id" style="display: none" th:value="${item.id}">
                    <button>删除</button>
                </form>
                <form method="post" action="mod" style="display: inline">
                    <input name="id" style="display: none" th:value="${item.id}">
                    <input name="name" style="display: none" th:value="${item.name}">
                    <input name="type" style="display: none" th:value="${item.type}">
                    <input name="price" style="display: none" th:value="${item.price}">
                    <button>修改</button>
                </form>
            </td>
        </tr>
    </table>
</body>
</html>